<script setup>
import { ref } from 'vue'

const activeIndex = ref('1')
const handleSelect = (key, keyPath) => {
  console.log(key, keyPath)
}
</script>
<template>
  <el-header>
    <div class="logo">logo</div>
    <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
    >
      <el-menu-item index="1">首页</el-menu-item>
      <el-menu-item index="2">菜单</el-menu-item>
      <el-menu-item index="3">管理</el-menu-item>
      <el-menu-item index="4">用户</el-menu-item>
    </el-menu>
    <div>设置</div>
  </el-header>
</template>

<style scoped lang="scss">
.el-header {
  width: 100%;
  display: flex;
  justify-content: space-around;
  .el-menu {
    flex: 1;
  }
  border: 1px solid;
}
</style>
